package cn.sanshuilin.kst.system.api.service;

import cn.sanshuilin.kst.system.api.exception.InvalidCaptchaException;
import cn.sanshuilin.kst.system.api.exception.base.BusinessException;

/**
 * @author greenlee
 * @version v1.0
 * @create 创建时间: 2018-01-24 20:53
 * Copyright 2017  by 三水林科技有限公司
 **/
public interface ISmsService {
    /**
     * 发送验证码
     * @param strMobile
     * @param strValidCode
     */
    public  void sendValidCodeToMobile(String strMobile, String strValidCode)throws BusinessException;

    /**
     * 生成验证码
     * @param n
     * @return
     */
    public String createRandomCode(int n);

    /**
     * 短信验证码是否过期
     * @param mobile
     * @param captcha
     * @throws InvalidCaptchaException
     */
    public void validCaptcha(String mobile, String captcha) throws InvalidCaptchaException;
}
